package com.example.everying.model.entity.system;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.*;
import com.example.everying.model.dto.content.ArtInfoDto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;

@Data
@TableName("sys_notification")
public class SysNotification {

    @ApiModelProperty(value = "id")
    @NotNull(message = "id不能为空")
    private String id;
    @ApiModelProperty(value = "标题")
    private String title;
    @ApiModelProperty(value = "内容")
    private String content;
    @ApiModelProperty(value = "类型 0-失效 1-待确认 2-已完成 3-申请 4-同意 5-拒绝 6-申诉 7-违规 8-退出 9-删除")
    private String type;
    @ApiModelProperty(value = "发送者ID")
    private String senderId;
    @ApiModelProperty(value = "接受者ID")
    private String recipientId;
    @ApiModelProperty(value = "优先级(0-9)")
    private String priority;
    @ApiModelProperty(value = "状态(0:待发送 1:已发送 2:已取消)")
    private String status;
    @ApiModelProperty(value = "是否删除")
    private Boolean isDelete;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "消息接收状态: 1-已读, 2-未读")
    private String msgStatus;

    @ApiModelProperty(value = "文章信息")
    private String artInfo;
}
